package com.jason.hadoop.map;

import com.jason.hadoop.bean.WordBean;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class WordOrderMap extends Mapper<Object, Text, WordBean, NullWritable> {

    @Override
    protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {
        WordBean wordBean = new WordBean();
        wordBean.setNum(Integer.parseInt(value.toString()));
        context.write(wordBean, NullWritable.get());
    }
}
